@import "~pc/styles/lib_var.less";
@import "~pc/styles/lib_mixins.less";
@import "~pc/styles/lib_screen.less";

.share {
  border: 1px solid var(--lineColor);
  border-radius: 4px;
  padding: 24px;

  .currentStatusWrapper {
    display: flex;
    align-items: center;
    font-size: 14px;
    position: relative;

    .currentStatus {
      display: flex;
      align-items: center;
      cursor: pointer;
      color: var(--thirdLevelText);
      font-weight: bold;

      &.sharing {
        color: var(--primaryColor);

        svg {
          fill: var(--primaryColor);
        }
      }

      svg {
        width: 16px;
        height: 16px;
        margin-left: 2px;
        fill: var(--thirdLevelText);
      }
    }
  }

  .statusDesc {
    font-size: 13px;
    color: var(--thirdLevelText);
    padding-top: 8px;
  }

  .unShareTip {
    padding-top: 8px;
    font-size: 12px;
    color: var(--thirdLevelText);
  }
}

.tip {
  font-size: 14px;
  color: var(--secondLevelText);
  padding: 24px 0 16px;
}

.shareLink {
  display: flex;
  flex-direction: row;
  padding-bottom: 24px;

  .inputContainer {
    flex: 1;
    height: 40px;
    margin-right: 16px;
    position: relative;

    .link {
      width: 100%;
      height: 100%;
      background-color: var(--lowestBg);
      line-height: 40px;
      padding: 0 8px;
      cursor: default;
      font-size: 14px;
      color: var(--firstLevelText);
      border-radius: 4px;
      border: 1px solid transparent;
      outline: none;
    }

    .highBorder {
      border-color: var(--primaryColor);
      transition: border 0.3s linear;
    }

    .inner_tip {
      position: absolute;
      top: 0;
      right: 0;
      height: 100%;
      line-height: 40px;
      text-align: right;
      padding: 0 8px 0 16px;
      color: var(--firstLevelText);
      background-color: var(--rowSelectedBg);
    }
  }

  .iconOffset {
    margin-top: 2px;
  }
}

.anyoneCanSeeTip {
  font-size: 13px;
  color: var(--secondLevelText);
  padding-top: 8px;
}

.closeShare {
  margin-top: 32px;
}

.popQrCode {
  :global {
    .ant-popover-inner {
      background: transparent;
      box-shadow: none;
    }

    .ant-popover-inner-content {
      padding: 0;
    }

    .ant-popover-arrow {
      width: 16px;
      height: 16px;
      z-index: 1;
    }
  }
}

.shareMenu {
  .menu {
    .item {
      &:hover {
        background: var(--rowSelectedBg);
      }
    }

    .item {
      width: 360px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 8px 16px;
      cursor: pointer;

      &.active {
        .title {
          color: var(--primaryColor);
        }

        svg {
          display: block;
        }
      }

      .title {
        font-size: 13px;
        color: var(--firstLevelText);
      }

      .desc {
        font-size: 12px;
        color: var(--thirdLevelText);
      }

      svg {
        width: 16px;
        height: 16px;
        fill: var(--primaryColor);
        display: none;
      }
    }
  }

  :global {
    .ant-popover-arrow {
      display: none;
    }

    .ant-popover-inner {
      box-shadow: 0px 4px 14px 0px fade(#000000, 10%);
    }

    .ant-popover-inner-content {
      padding: 8px 0;
    }
  }
}

.tipItem {
  display: flex;

  .bold {
    font-weight: bold;
  }

  .tipContent1,
  .tipContent2 {
    color: var(--firstLevelText);
    padding-left: 4px;
  }

  .tipContent1 {
    padding-bottom: 16px;
  }

  .tipContent2 {
    padding-bottom: 8px;
  }

  &::before {
    display: inline-block;
    content: "";
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--fourthLevelText);
    flex-shrink: 0;
    margin-top: 10px;
  }
}

.linkNodes {
  padding-left: 7px;
  max-height: 72px;
  overflow: auto;
  .light-scroll-bar();

  .linkNode {
    padding-bottom: 8px;
    position: relative;
    line-height: 14px;
    font-size: 12px !important;
    font-weight: normal !important;
    display: flex;

    &::before {
      content: "";
      width: 4px;
      height: 1px;
      background: var(--thirdLevelText);
      flex-shrink: 0;
      margin-top: 6px;
    }

    .linkNodeName {
      flex: 1;
      color: var(--thirdLevelText);
      padding-left: 4px;
      display: -webkit-box;
      word-break: normal;
      word-wrap: break-word;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
      // .ellipsis();
      cursor: default;
    }
  }
}

.shareCodeModal {
  width: auto !important;

  :global {
    .ant-modal-content {
      box-shadow: none;
      background: transparent;
      border: 0;
    }

    .ant-modal-body {
      padding: 0 0 16px !important;
    }
  }
}

// Mobile
@media screen and (max-width: @w-md) {
  .share {
    padding: 16px;

    .inputContainer {
      margin-right: 16px;
    }
  }
}

.menuDrawer {
  :global {
    .ant-drawer-content {
      background: var(--lowestBg);
    }
  }

  .main {
    border-radius: 8px;
    background: var(--defaultBg);
  }

  .itemMobile {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--lineColor);
    margin: 0 16px;
    padding: 9px 0;

    &:last-child {
      border-bottom: none;
    }

    .title {
      font-size: 15px;
      color: var(--firstLevelText);
      padding-bottom: 4px;
    }

    .desc {
      font-size: 12px;
      color: var(--thirdLevelText);
    }
  }


  .closeShare {
    height: 48px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    margin-top: 24px;
    color: var(--errorColor);
    background: var(--defaultBg);
    border-radius: 8px;

    svg {
      width: 16px;
      height: 16px;
      fill: var(--errorColor);
      margin-right: 8px;
    }
  }
}

.disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
}

.inputBtn {
  width: 40px;
  height: 40px !important;
  padding: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
